package com.example.personnel_oa.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.example.comment_oa.pojos.SysDept;
import com.example.personnel_oa.mapper.SysDeptMapper;
import com.example.personnel_oa.service.SysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author asus
* @description 针对表【sys_dept】的数据库操作Service实现
* @createDate 2022-10-17 17:34:55
*/
@Service
public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept>
    implements SysDeptService {
    @Autowired
    SysDeptMapper sysDeptMapper;

    //查询全部部门
    @Override
    public List<SysDept> selectDept() {
        List<SysDept> sysDepts = sysDeptMapper.selectDept();
        return sysDepts;
    }
    //根据部门id查全部职位
    @Override
    public List<SysDept> selectDeptPost(int deptId) {
        List<SysDept> sysDepts = sysDeptMapper.selectDeptPost(deptId);
        return sysDepts;
    }

    //查询全部部门不包含董事会
    @Override
    public List<SysDept> selectDepts() {
        List<SysDept> sysDepts = sysDeptMapper.selectDepts();
        return sysDepts;
    }
}




